home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 4 / Windows 6-Pak (InfoMagic) (Disc 4) (1999).ISO / Text-Chat-Addins / C-Script.exe / Sysfiles / Aliases / alias2.mrc next >
Encoding:
Text File  |  1998-05-15  |  25.1 KB  |  476 lines

  1. www.parse2 {
  2.   unset %www.title %bkmrk.* | wincheck @C-ScriptáBrowser -l19 @C-ScriptáBrowser $center(634,380) 634 380 @C-ScriptáBrowser comic sans ms 12
  3.   if $1 != $null { set %www.num $1 }
  4.   else set %www.num 1
  5.   set %twww.file %www.num | set %www.count 0 | set %www.line $mircdirsysfiles\www\ $+ %www.num $+ .html | set %www.line $lines(%www.line)
  6.   :next
  7.   inc %www.count | if %www.count > %www.line goto end
  8.   set %www.ps $read -nl $+ %www.count sysfiles\www\ $+ %www.num $+ .html
  9.   set %www.ps ^ $+ $replace(%www.ps,><,>^<) $+ ^
  10.   set %www.ps $replace($replace($replace($replace(%www.ps,ALT=",>^<IMG_ALT "),<B>,),</B>,),<a href,12<a href)
  11.   set %www.ps $replace(%www.ps,>,<)
  12.   :next2
  13.   if (< !isin %www.ps) {
  14.     if $remove($remove($remove($remove(%www.ps,),),$chr(9)),^) != $null { echo @C-Scriptábrowser $remove($remove($replace($replace($replace($replace($replace($replace($replace($replace(%www.ps,","), ,$chr(160)),©,⌐),®,«),<,<),>,>),&,&),©,⌐),$chr(9)),^) } | goto next
  15.   }
  16.   ;if ($mid($gettok(%www.ps,2,60),1,6) == script) { set %www.script 1 }
  17.   ;if ($gettok(%www.ps,2,60) == /script) { unset %www.script | goto next }
  18.   ;if (%www.script == 1) { goto next }
  19.   if $left($gettok(%www.ps,2,60),7) == a $+ $chr(32) $+ href= { set %tFile $remove($gettok($remove($gettok(%www.ps,2,60),a href=),1,32),") }
  20.   if $gettok(%www.ps,2,60) == /a { set %www.ps $gettok(%www.ps,1,60) $+ ( $+ %tfile $+ ) $gettok(%www.ps,3-,60) | goto next2 }
  21.   if $gettok($gettok(%www.ps,2,60),1,32) == IMG_ALT { set %www.ps $gettok(%www.ps,1,60) $+ (img) $+ $gettok($gettok(%www.ps,2,60),2,34) $+ (img) $gettok(%www.ps,3-,60) | goto next2 }
  22.   set %www.ps $gettok(%www.ps,1,60) $+ $gettok(%www.ps,3-,60)
  23.   goto next2
  24.   :end
  25.   set %swww.bkmrk $readini sysfiles\www\settings.ini recent %www.num $+ ⌐ $+ %www.title
  26.   unset %www.* | sline @C-ScriptáBrowser 18 | next 1
  27. }
  28. ;C-Script v5.0 ⌐ 1998 C-Team. All rights reserved.
  29. ;Configure at your own risk
  30. ;Seen script, and script aliases
  31.  
  32. ;==========
  33. ;Useful script aliases
  34. ;==========
  35.  
  36. ;Backup pertinent C-Script files
  37. backup { run sysfiles\backup.bat }
  38. ;Raw connecting
  39. rawcon { sock $1- }
  40. ;Client-to-client-protocal
  41. ctcp {
  42.   if ($2 == PING) {
  43.     raw -q PRIVMSG $1 : $+ $chr(1) $+ PING $ticks $+ $chr(1)
  44.     echo  $+ $clr(ctcp) $+ -> $chr(91) $+ $1 $+ $chr(93) PING
  45.     halt
  46.   }
  47.   ctcp $1-
  48. }
  49. ;Gets server links
  50. links { set %lnkscnt 0 | raw -q links }
  51. ;Plays specified page message
  52. playmsg set %msgnum 0 | set %msgnicks "" | .timer350 off | set %temp $readini sysfiles\page\page.ini page $$1 | if (%temp == $null) { echo  $+ $clr(info) $+ *** Message from $$1 not found! } | else { $readini sysfiles\page\page.ini page $$1 | remini $mircdirsysfiles\page\page.ini page $$1 }
  53. ;Find out the country of a specific domain (i.e. *.com)
  54. country set %temp $read -s $+ $1 sysfiles\country.txt | if (%temp == $null) { echo  $+ $clr(info) $+ *** Unknown Domain } | else { echo  $+ $clr(info) $+ *** %temp }
  55. ;Notify list
  56. notify { notify $1- | update }
  57. ;Comments, suggestion, bugs, and reports
  58. comments { mail.initiate sethd@c-script.com }
  59. ;Telnet connecting
  60. telnet sock $$1 23
  61. ;Sets the fserver directory
  62. fservedir { set %fservedir $$?="FServe Directory:" | if ($exists(%fservedir) == $false) { set %fserved } | echo  $+ $clr(info2) $+ *** FServe directory set to: %fservedir }
  63. ;C-Script help
  64. chelp {
  65.   .load -rs sysfiles\help\chelp.mrc
  66.   chelprun
  67.   if ($1 != $null) {
  68.     set %tmp.chl $read -s $+ $1 sysfiles\help\ifiles.mrc
  69.     if (%tmp.chl != $null) {
  70.       .timer 1 1 chlpl %tmp.chl
  71.     }
  72.   }
  73. }
  74. c-help { chelp }
  75. ;C-Script status (settings & protections)
  76. CStatus {
  77.   wincheck @settings +bn @Settings $center(600,-3000) 300 260 @Settings Comic sans ms 12
  78.   wincheck @protection +bn @Protection $center(0,-3000) 300 260 @Protection comic sans ms 12
  79.   wincheck %csstsw -p +bn %csstsw $center(600,5000) 600 132 %csstsw Comic sans ms 12
  80.   drawfill %csstsw 0 0 0 0
  81.   drawpic %csstsw 75 0 /sysfiles/stats.bmp
  82.   echo @Settings  $+ $clr(info) $+ Auto-Adapt: $+ $clr(info2) $group(#autoapt)
  83.   echo @Settings  $+ $clr(info) $+ Auto-Greet: $+ $clr(info2) $group(#autogreet)
  84.   echo @Settings  $+ $clr(info) $+ Auto-Spell: $+ $clr(info2) $group(#autospell)
  85.   echo @Settings  $+ $clr(info) $+ Auto-Talk: $+ $clr(info2) $group(#autotalk)
  86.   echo @Settings  $+ $clr(info) $+ Auto-Whois: $+ $clr(info2) $group(#awhois)
  87.   echo @Settings  $+ $clr(info) $+ Auto Idle-Away: $+ $clr(info2) %idleaway
  88.   echo @Settings  $+ $clr(info) $+ ChanCloneScan: $+ $clr(info2) $group(#chanclone)
  89.   echo @Settings  $+ $clr(info) $+ Color Stripper: $+ $clr(info2) %stripper
  90.   echo @Settings  $+ $clr(info) $+ CTCPs: $+ $clr(info2) $group(#groupctcp)
  91.   echo @Settings  $+ $clr(info) $+ CTCP-Reply: $+ $clr(info2) $group(#ctcpreply)
  92.   echo @Settings  $+ $clr(info) $+ ChanRe-Join: $+ $clr(info2) %chanrejoin
  93.   echo @Settings  $+ $clr(info) $+ ChanStats: $+ $clr(info2) $group(#chanstats)
  94.   echo @Settings  $+ $clr(info) $+ Error-Echo: $+ $clr(info2) $group(#errorecho)
  95.   echo @Settings  $+ $clr(info) $+ Fake Ping-Reply: $+ $clr(info2) $group(#fakeping)
  96.   echo @Settings  $+ $clr(info) $+ Friends: $+ $clr(info2) $group(#group7)
  97.   echo @Settings  $+ $clr(info) $+ FServe: $+ $clr(info2) $group(#fserv)
  98.   echo @Settings  $+ $clr(info) $+ á $+ $chr(149) $+ Keyword: $+ $clr(info2) %fsvkey
  99.   echo @Settings  $+ $clr(info) $+ IAL Auto-Update: $+ $clr(info2) $group(#ialaupd)
  100.   echo @Settings  $+ $clr(info) $+ Join-Greet: $+ $clr(info2) $group(#greet)
  101.   echo @Settings  $+ $clr(info) $+ Links Extras: $+ $clr(info2) $group(#links)
  102.   echo @Settings  $+ $clr(info) $+ NetSplit Detector: $+ $clr(info2) $group(#nsplit)  
  103.   echo @Settings  $+ $clr(info) $+ NickComplete: $+ $clr(info2) $group(#nc)
  104.   echo @Settings  $+ $clr(info) $+ NotifyExtras: $+ $clr(info2) $group(#notify)
  105.   echo @Settings  $+ $clr(info) $+ RawEcho: $+ $clr(info2) $group(#rawecho)
  106.   echo @settings  $+ $clr(info) $+ á $+ $chr(149) $+ Echoing to: $+ $clr(info2) $replace($replace(%wrecho,-s,Status),-a,Active)
  107.   echo @Settings  $+ $clr(info) $+ Record: $+ $clr(info2) $group(#record)  
  108.   echo @Settings  $+ $clr(info) $+ Seen: $+ $clr(info2) $group(#seen)
  109.   echo @Settings  $+ $clr(info) $+ ShootList: $+ $clr(info2) $group(#groupshoot)
  110.   echo @Settings  $+ $clr(info) $+ SoundExtras: $+ $clr(info2) $group(#sounds)
  111.   echo @Settings  $+ $clr(info) $+ UserMode-Extras: $+ $clr(info2) $group(#usermode)
  112.   echo @Settings  $+ $clr(info) $+ WallOps: $+ $clr(info2) $group(#wallops)
  113.   echo @Settings  $+ $clr(info) $+ á $+ $chr(149) $+ Box: $+ $clr(info2) %wallopsbox
  114.   echo @Settings  $+ $clr(info) $+ XDCC: $+ $clr(info2) $group(#xdcc)
  115.   echo @Protection  $+ $clr(info) $+ Address: $+ $clr(info2) $group(#addpro)
  116.   echo @Protection  $+ $clr(info) $+ Ban: $+ $clr(info2) %banprot
  117.   echo @Protection  $+ $clr(info) $+ CTCP Flood: $+ $clr(info2) $group(#ctcppro)
  118.   echo @Protection  $+ $clr(info) $+ á $+ $chr(149) $+ CTCPs: $+ $clr(info2) %cfldn in $mpy(%cfldt,%cfldn) secs
  119.   echo @Protection  $+ $clr(info) $+ Hack: $+ $clr(info2) $group(#hackpro)
  120.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Force Modes: $+ $clr(info2) %forcemodesison
  121.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ Modes: $+ $clr(info2) + $+ %forcemodes
  122.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Disallow Modes: $+ $clr(info2) %disallowmodesison
  123.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ Modes: $+ $clr(info2) + $+ %disallowmodes
  124.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Disallow Toplevel Bans: $+ $clr(info2)  %hacktoplevel
  125.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ MassDeop Pro: $+ $clr(info2) %massdeop
  126.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ Deops: $+ $clr(info2) %maxdeops in %deoptime secs
  127.   echo @Protection  $+ $clr(info) $+ Invite Flood: $+ $clr(info2) $group(#invitefloodpro)
  128.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Invites: $+ $clr(info2) %invfpn in $mpy(%invfpt,%invfpn) secs
  129.   echo @Protection  $+ $clr(info) $+ Nick Flood: $+ $clr(info2) $group(#nkfloodpro)
  130.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Nicks: $+ $clr(info2) %nflnm in $mpy(%nfltmn,%nflnm) secs
  131.   if (%csmspass == $null) { echo @Protection  $+ $clr(info) $+ Password: $+ $clr(info2) Off }
  132.   if (%csmspass != $null) { echo @Protection  $+ $clr(info) $+ Password: $+ $clr(info2) On | echo @Protection á $+  $+ $clr(info) $+ $chr(149) $+ Key/Word: $+ $clr(info2) %csmspass }
  133.   echo @Protection  $+ $clr(info) $+ Text Protections:
  134.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Channel: $+ $clr(info2) $group(#floodpro)
  135.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Message: $+ $clr(info2) $group(#mfloodpro)
  136.   echo @Protection á $+ $clr(info) $+ $chr(149) $+ Notice: $+ $clr(info2) $group(#nfloodpro)
  137.   echo @Protection áá $+ $clr(info) $+ Sections:
  138.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ BigMouthBan: $+ $clr(info2) %lengthtfg
  139.   echo @Protection ááá $+ $clr(info) $+ $chr(149) $+ Max len. of 1st word: $+ $clr(info2) %lfowlt
  140.   echo @Protection ááá $+ $clr(info) $+ $chr(149) $+ Max len. of sentence: $+ $clr(info2) %lfawlt
  141.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ CapsBan: $+ $clr(info2) %capskickg
  142.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ ColorBan: $+ $clr(info2) %coltfldg
  143.   echo @Protection ááá $+ $clr(info) $+ $chr(149) $+ Max color codes: $+ $clr(info2) %clrflt
  144.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ CussKick: $+ $clr(info2) %ckickg
  145.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ RepeatBan: $+ $clr(info2) %rpttg
  146.   echo @Protection áá $+ $clr(info) $+ $chr(186) $+ Text Flood: $+ $clr(info2) %chntfldg
  147.   echo @Protection ááá $+ $clr(info) $+ $chr(149) $+ Lines: $+ $clr(info2) %cfllns in $mpy(%cfllps,%cfllns) secs
  148.   echo @Protection  $+ $clr(info) $+ Ban/Ignore: $+ $clr(info2) %prtbntm sec ban and %prtigtm sec ignore
  149.   sline @settings 14
  150.   sline @protection 14
  151. }
  152. ;Basic scriptinfo: version and addons
  153. scriptinfo {
  154.   wincheck @ScriptáInformation @ScriptáInformation $center(500,250,@ScriptáInformation) $wh(500,250,@ScriptáInformation) @ScriptáInformation Comic Sans MS 12
  155.   echo @ScriptáInformation  $+ $clr(info) $+ $vers
  156.   echo @ScriptáInformation  $+ $clr(highlight) $+ http://www.c-script.com/ and /server irc.c-script.com
  157.   if ($len(%addons) <= 4) { goto final }
  158.   else {
  159.     echo @ScriptáInformation á
  160.     echo @ScriptáInformation  $+ $clr(info) $+ Addon Info:
  161.     set %tmp.adnlp 1
  162.     set %tmp.adnc $count(%addons,$chr(160))
  163.     :loop
  164.     if ($gettok(%addons,1,160) == $null || %tmp.adnlp > %tmp.adnc) { goto end }
  165.     set %tmp.adni $gettok(%addons,%tmp.adnlp,160))
  166.     set %tmp.adni2 [ % [ $+ [ %tmp.adni ] ] ]
  167.     if (%tmp.adni2 == $null) { echo @ScriptáInformation  $+ $clr(info2) $+  $+ %tmp.adnlp $+ . %tmp.adni - No Info Available! }
  168.     else { echo @ScriptáInformation  $+ $clr(info2) $+  $+ %tmp.adnlp $+ . %tmp.adni - %tmp.adni2 }
  169.     inc %tmp.adnlp
  170.     goto loop
  171.     :end
  172.   }
  173.   :final
  174. }
  175. ;Auto-Spell command. Use either "/aspell on" or "/aspell off"
  176. aspell {
  177.   if ($1 == $null) { set %aspellq $?="Turn Auto-Spell On or Off?" }
  178.   else { set %aspellq $1 }
  179.   if (%aspellq == On) { .enable #autospell | echo  $+ $clr(info2) $+ Auto-Spell is now: On | popchng on 3 | halt }
  180.   elseif (%aspellq == Off) { .disable #autospell | echo  $+ $clr(info2) $+ Auto-Spell is now: Off | popchng off 3 | halt }
  181.   else { echo  $+ $clr(info2) $+ Auto-Spell Error! Syntax: /aspell On or /aspell Off | halt }
  182. }
  183. ;Brings up help window.
  184. help {
  185.   if ($1 != $null) { help $1- | halt }
  186.   wincheck @help -p +nbt @Help $center(131,103,@Help) 131 103 @Help Comic Sans MS 14
  187.   drawpic @help 0 0 sysfiles/help/help2.bmp
  188. }
  189. ;Change personal connect modes
  190. usermodes {
  191.   set %usrmodes $$?="Select Usermodes for Startup: (Eg. +iw)"
  192.   if ($chr(43) != $left(%usrmodes,1)) { set %usrmodes $chr(43) $+ %usrmodes }
  193.   echo -a  $+ $clr(info) $+ *** StartUp Usermodes: %usrmodes
  194. }
  195. ;Progress bar in a window. Syntax: /progbar <total> <complete> <window> <left> <top>
  196. progbar {
  197.   set %prog.size $$1 | set %prog.rcvd $$2 | set %prog.window $$3 | set %prog.left $$4 | set %prog.top $$5
  198.   set %prog.barnum $int($calc($calc(%prog.rcvd * 100) / %prog.size))
  199.   if (%prog.barnum > 100) { set %prog.barnum 100 }
  200.   if (%prog.barnum < 1) { goto end }
  201.   drawrect -f %prog.window 15 4 $calc(%prog.left + 42) %prog.top 20 10
  202.   drawrect -f %prog.window 2 4 %prog.left %prog.top %prog.barnum 10
  203.   if (%prog.barnum < 43) { drawtext -o %prog.window 1 arial 14 $calc(%prog.left + 43) %prog.top %prog.barnum $+ $chr(37) }
  204.   else drawtext -o %prog.window 0 arial 14 $calc(%prog.left + 40) $calc(%prog.top - 1) %prog.barnum $+ $chr(37)
  205.   :end
  206.   unset %prog.* | return
  207. }
  208.  
  209. ;==========
  210. ;The following is a group of aliases generally not useful to the average user,
  211. ;but neccessary to the script's functionality
  212. ;==========
  213.  
  214. ;cleaning of various features
  215. wwwclean {
  216.   set %tmp.1 $findfile($mircdirwww\,*,0)
  217.   :loop
  218.   if (%tmp.1 < 1) { goto end }
  219.   .remove $findfile($mircdirwww\,*,%tmp.1)
  220.   dec %tmp.1
  221.   goto loop
  222.   :end
  223. }
  224. pageclean write -c sysfiles\page\page.ini | write -l1 sysfiles\page\page.ini [page]
  225. recclean write -c sysfiles\recent.ini
  226. ;Various echos
  227. wecho echo $clr(info) -a %cslogo $1-
  228. wecho2 echo $clr(info) -a å) $1-
  229. wrecho echo $clr(info) %wrecho å) $1-
  230. ;Error checking
  231. oecho echo  $+ $clr(info) $+ *** You need ops on # to ban someone
  232. oecho2 echo  $+ $clr(info) $+ *** You need ops on # to kick someone
  233. oecho3 echo  $+ $clr(info) $+ *** You need ops on # to ban/kick someone
  234. oecho4 echo  $+ $clr(info) $+ *** You need ops on # to perform this function | return halt
  235. ;Startup alias, not of much use accept in the script
  236. start {
  237.   if ($readini -n sysfiles\update.ini update upgrade == $null) { .load -a sysfiles\aliases\startup.mrc | set %upgrade no | startcs }
  238.   else { set %loadvar 1 | set %upgrade yes | restore }
  239. }
  240.  
  241. ;Used by script on connect
  242. ;WARNING: Tampering with, or removing this alias *WILL* cause C-Script to not
  243. ;work properly!
  244. startup {
  245.   addrec server
  246.   if (%ctcpbox == On && $window(@IncomingáCTCPs:) == $null) { inctcpwin }
  247.   if (%snoticebox == On) {
  248.     if ($window(@IncomingáSNotices:) == $null) { insnotwin } | else { clear %cssnot }
  249.     if (s isin %usrmodes) { mode $me %usrmodes } | else { mode $me %usrmodes $+ +s }
  250.   }
  251.   else { .mode $me %usrmodes }
  252.   set %me $me
  253.   set %awme * $+ $me $+ *
  254.   set %dccemme = $+ $me
  255.   .auser 10 $me
  256.   .guser 10 $me 3
  257.   unset %deccln
  258.   unset %chanflood*
  259.   unset %msgflood*
  260.   unset %notflood*
  261.   unset %ctcpflood*
  262.   unset %nickfld*
  263.   unset %repeat*
  264.   unset %cskickn*
  265.   unset %link*
  266.   unset %deopnick*
  267.   unset %servops*
  268.   unset %nsplit1 %nsplit2
  269.   unset %jnsynctchns
  270.   unset %invflood*
  271.   unset %temp*
  272.   unset %tmp*
  273.   set %signon $ctime
  274.   set %sontime $day $adate $time
  275.   set %colorfcodes 0
  276.   set %web.dns off
  277.   set %mail.dns off
  278.   set %lnkscnt 0
  279.   .timer338 off
  280.   inc %verchkcntdwn 1
  281.   inc %setcntdwn 1
  282. .identd off
  283.   .timer735 0 30 idleaway
  284.   .timer736 0 60 online
  285.   if (%setcntdwn >= 5) { set %setcntdwn 0 | update }
  286.   if (%verchkcntdwn >= 30) { set %verc.sil on | vercheck | update | wwwclean }
  287.   if ($chat($me) == $null) {
  288.     set %dccoffline Yes
  289.     set %comsndr Off
  290.   }
  291.   if ($email == $null) { set %awayemail N/A } | else { set %awayemail $email }
  292.   if (%top.play == on) { .play -ctTitles $me sysfiles\other.mrc 100 }
  293.   unset %startupm
  294.   startcchk
  295.   startac
  296. }
  297. ;Used by script for titlebar stats
  298. titles {
  299.   if ($1 == $null) { echo 4 -a Syntax: /titles [on|off] | halt }
  300.   if ($1 == off) { set %c-tips off | set %title-bar.a off | set %top.play off }
  301.   else { set %c-tips on | set %title-bar.a on | set %top.play on }
  302. }
  303. ;channel control
  304. mop { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to op someone | halt } | else { cntrl + o Op $$1- } }
  305. mdeop { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to deop someone | halt } | else { cntrl - o Deop $$1- } }
  306. voice { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to voice someone | halt } | else { cntrl + v Voice $$1- } }
  307. devoice { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to devoice someone | halt } | else {  cntrl - v DeVoice $$1- } }
  308. mvoice { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to voice someone | halt } | else { cntrl + v Voice $$1- } }
  309. mdevoice { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to devoice someone | halt } | else { cntrl - v DeVoice $$1- } }
  310. k { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to kick someone | halt } | else { kick # $$1 $2- } }
  311. bk { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to kick/ban someone | halt } | else { cntrl2 + b ban 3 $$1 | kick # $$1 $2-  } }
  312. op { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to op someone | halt } | else { cntrl + o Op $$1- } }
  313. deop { if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to op someone | halt } | else { cntrl - o Deop $$1- } }
  314. cntrl2 {
  315.   if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to $$3 someone | halt }
  316.   else {
  317.     set %count 0 | set %count1 0
  318.     :next
  319.     inc %count | inc %count1
  320.     if ($gettok($5-,%count,32) == $null) {
  321.       dec %count1
  322.       if (%count1 == 1) { mode $active $1 $+ $str($2,1) $address($gettok($5-,$calc(%count - 1),32),$4) }
  323.       if (%count1 == 2) { mode $active $1 $+ $str($2,2) $address($gettok($5-,$calc(%count - 2),32),$4) $address($gettok($5-,$calc(%count - 1),32),$4) }
  324.       unset %count* | goto end
  325.     }
  326.     if (%count1 == 3) {
  327.       mode $active $1 $+ $str($2,3) $address($gettok($5-,$calc(%count - 2),32),$4) $address($gettok($5-,$calc(%count - 1),32),$4) $address($gettok($5-,%count,32),$4)
  328.       set %count1 0
  329.     }
  330.     goto next
  331.     :end
  332.   }
  333. }
  334. cntrl {
  335.   if ($me !isop #) { echo  $+ $clr(info) $+ *** You need ops on # to $$3 someone | halt }
  336.   else {
  337.     set %count 0 | set %count1 0
  338.     :next
  339.     inc %count | inc %count1
  340.     if ($gettok($4-,%count,32) == $null) {
  341.       dec %count1
  342.       if (%count1 == 1) { mode $active $1 $+ $str($2,1) $gettok($4-,$calc(%count - 1),32) }
  343.       if (%count1 == 2) { mode $active $1 $+ $str($2,2) $gettok($4-,$calc(%count - 2),32) $gettok($4-,$calc(%count - 1),32) }
  344.       unset %count* | goto end
  345.     }
  346.     if (%count1 == 3) {
  347.       mode $active $1 $+ $str($2,3) $gettok($4-,$calc(%count - 2),32) $gettok($4-,$calc(%count - 1),32) $gettok($4-,%count,32)
  348.       set %count1 0
  349.     }
  350.     goto next
  351.     :end
  352.   }
  353. }
  354. cmnd {
  355.   set %tmp.cmnd $gettok($1-,1,39)
  356.   set %tmp.nks $gettok($1-,2,39)
  357.   if ($left(%tmp.nks,1) == $chr(32)) { set %tmp.nks $mid(%tmp.nks,2,$len(%tmp.nks)) }
  358.   set %tmp.cmndc 1
  359.   set %tmp.cmndc2 $calc($count(%tmp.nks,$chr(32)) + 1)
  360.   :loop
  361.   if (%tmp.cmndc > %tmp.cmndc2) { goto done }
  362.   %tmp.cmnd $gettok(%tmp.nks,%tmp.cmndc,32)
  363.   inc %tmp.cmndc
  364.   goto loop
  365.   :done
  366. }
  367. cssend {
  368.   set %tmp.nks $1-
  369.   if ($left(%tmp.nks,1) == $chr(32)) { set %tmp.nks $mid(%tmp.nks,2,$len(%tmp.nks)) }
  370.   set %tmp.cmndc $calc($count(%tmp.nks,$chr(32)) + 1)
  371.   :loop
  372.   if (%tmp.cmndc == 0) { goto done }
  373.   dcc send $gettok(%tmp.nks,%tmp.cmndc,32) $mircdirC-Script.exe
  374.   dec %tmp.cmndc
  375.   goto loop
  376.   :done
  377. }
  378. ;C-Tip alias for titlebar. The tips are also listed in the C-Script help by pressing f1.
  379. c-tip if (%c-tips == on) { titlebar - C-Tip $read sysfiles\help\tips.txt } | else { .timer338 off }
  380. ;Special windows for wallops, ctcps, etc.
  381. inctcpwin if ($1 == -c) { window -c %csctcp } | else { wincheck %csctcp %csctcp $xy(0,$calc(%y.max - 110 / 2),%csctcp) $wh(315,110,%csctcp) %csctcp comic sans ms 11 }
  382. insnotwin if ($1 == -c) { window -c %cssnot } | else { wincheck %cssnot %cssnot $xy.max(315,110,%cssnot) $wh(315,110,%cssnot) %cssnot comic sans ms 11 }
  383. wallopsbox if ($1 == -c) { window -c @WallOps } | else { wincheck @wallops -e @WallOps $xy($calc(%x.max - 375 / 2),0,@wallops) $wh(375,150,@WallOps) /wall @WallOps comic sans ms 11 }
  384. wallopsbox2 if ($1 == -c) { window -c @WallOps } | else { wincheck @wallops @WallOps $xy($calc(%x.max - 375 / 2),0,@wallops) $wh(375,150,@WallOps) @WallOps comic sans ms 11 }
  385. msglogw if ($1 == -c) { window -c %msglogw } | else { wincheck %msglogw %msglogw $center(415,110,%msglogw) $wh(415,110,%msglogw) %msglogw comic sans ms 11 }
  386. ;Uses to check whether a window is open or not (i.e. /wincheck @c -l @c 1 1 1 1)
  387. wincheck {
  388.   if ($window($1).state == $null) { window $2- | return }
  389.   window -r $1 | window -a $1 | clear $1 | clear -l $1 | return
  390. }
  391. online { %total = $ctime - %signon | set %total $stime(%total) | if ($away == $true) { %atotal = $ctime - %awaytime | set %atotal $stime(%atotal) } | set %pongtime $ticks | set %me $me | if (%title-bar.a == on) { .raw -q PRIVMSG $me :LAG $ticks $+  } }
  392. title {
  393.   if (%title-bar.a != on) { halt }
  394.   if ($away == $false) { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Lag: %lag $chr(124) Idle: $stime($duration($idle)) $chr(124) Online: $stime($duration(%total)) $+ $chr(93) }
  395.   elseif (($away == $true) && (%PGER == On) && (%msglog == On)) { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Away: $stime($duration(%atotal)) $chr(124) PM: %msgnum $chr(124) MM: %mlmsgnum $chr(124) Lag: %lag $chr(124) Online: $stime($duration(%total)) $+ $chr(93) }
  396.   elseif (($away == $true) && (%PGER == On) && (%msglog != On)) { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Away: $stime($duration(%atotal)) $chr(124) PM: %msgnum $chr(124) Lag: %lag $chr(124) Online: $stime($duration(%total)) $+ $chr(93) }
  397.   elseif (($away == $true) && (%msglog == On) && (%PGER != On)) { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Away: $stime($duration(%atotal)) $chr(124) MM: %mlmsgnum $chr(124) Lag: %lag $chr(124) Online: $stime($duration(%total)) $+ $chr(93) }
  398.   elseif (($away == $true) && (%PGER != On) && (%msglog != On)) { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Away: $stime($duration(%atotal)) $chr(124) Lag: %lag $chr(124) Online: $stime($duration(%total)) $+ $chr(93) }
  399.   else { titlebar %verwoc $satime $aday $sadate $chr(91) $+ Lag: %lag $chr(124) Idle: $duration($idle) $chr(124) Online: $duration(%total) $+ $chr(93) }
  400. }
  401. ;For statement
  402. for {
  403.   set %loop 0
  404.   :next
  405.   inc %loop
  406.   if (%loop > $1) { unset %loop | return }
  407.   $2-
  408.   goto next
  409. }
  410. ccls window -c @c-script
  411. rsent disable #Send
  412. sent enable #Send
  413. en enable $$1
  414. dis disable $$1
  415. files .play -c $me $mircdirfiles.txt 50
  416. echo {
  417.   set %parms $$1-
  418.   if ($left($1,1) == @ && $2 != $null) {
  419.     if ($window($1).x == $null) { set %s -s | set %clr >á | set %parms $2- | goto end }
  420.     else set %s $1 | set %parms $2-
  421.     goto end 
  422.   }
  423.   if ($left($2,1) == @) && ($2 isnum) {
  424.     if ($window($2).x == $null) { set %s -s | set %clr  $+ $1 $+ >á | set %parms $3- | goto end }
  425.     if ($1 isnum) { set %s $2 | set %clr  $+ $1 $+  | set %parms $3- | goto end }
  426.     goto end
  427.   }
  428.   if ($left($active,1) == @) && ($left($1,1) != @) && ($left($2,1) != @) {
  429.     if ($1 == -a) { set %s -s | set %parms $2- | goto end }
  430.     if ($1 == -s) { set %s -s | set %parms $2- | goto end }
  431.     if ($1 isnum) && ($2 == -a) { set %s -s | set %clr  $+ $1 $+  | set %parms $3- | goto end }
  432.     if ($1 isnum) && ($2 == -s) { set %s $2 | set %clr  $+ $1 $+  | set %parms $3- | goto end }
  433.     if ($1 isnum) { set %s -s | set %clr  $+ $1 $+  | set %parms $2- | goto end }
  434.     set %s -s
  435.   }
  436.   if ($1 isnum) && ($left($1,1) != @) && ($left($2,1) != @) && ($2 != $null) {
  437.     if ($2 == -s) || ($2 == -a) { set %s $2 | set %clr  $+ $1 $+  | set %parms $3- | goto end }
  438.     set %clr  $+ $1 $+  | set %parms $2-
  439.   }
  440.   if (($1 isnum && $2- == $null) || ($left($1,1) == @ && $2- == $null)) { echo -a $1 | goto end2 }
  441.   :end
  442.   if (%parms == $null) || (%parms == -a) || (%parms == -s) || (($left(%parms,1) == @) && ($gettok(%parms,2,32) == $null) && (%s == $null)) { echo -s  $+ $clr(info) $+ * /echo: insufficient parameters | goto end2 }
  443.   echo %s %clr $+ $stpr(%parms)
  444.   :end2
  445.   unset %s %parms %clr
  446. }
  447. winlog writeini sysfiles\win.ini windows $fx($1) $+ x $window($1).x | writeini sysfiles\win.ini windows $fx($1) $+ y $window($1).y | writeini sysfiles\win.ini windows $fx($1) $+ w $window($1).w | writeini sysfiles\win.ini windows $fx($1) $+ h $window($1).h | return
  448. window {
  449.   if (c isin $$1) && (- isin $1) {
  450.     set %count 0
  451.     :next
  452.     inc %count | if ($gettok($1-,%count,32) == $null) { goto end }
  453.     if ($left($gettok($1-,%count,32),1) == @) && ($window($gettok($1-,%count,32)).state != $null) { winlog $gettok($1-,%count,32) | goto end }
  454.     goto next
  455.   }
  456.   :end
  457.   unset %count | window $1-
  458. }
  459. ;MOTD
  460. showmotd {
  461.   filter -ff debug.log debug2.log *372  $+ * $+ $me $+ * $+ :-*
  462.   .remove debug.log | window -h @ttt | loadbuf 150 @ttt debug2.log
  463.   window @ $+ $server $center(620,370) 620 370 @motd courier new 11 | for $line(@ttt,0) aline @ $+ $server á | sline @ $+ $server 23
  464.   set %count 0
  465.   :next
  466.   inc %count | if (%count > $line(@ttt,0)) { goto end }
  467.   set %read $gettok($line(@ttt,%count),2-,58)
  468.   rline @ $+ $server $next $replace(%read,$chr(32),$chr(160))
  469.   goto next
  470.   :end
  471.   window -c @ttt | .remove debug2.log | unset %count %read
  472.   if (%startupm == 1) { echo -a  $+ $clr(info) $+ *** Successfully connected to $server $+ ... | set %count 0 } | unset %startupm | .remove debug.log | next 1
  473. }
  474. ;Clear active screen
  475. cls clear $active
  476.